
public class TestMain {
    public static void main(String[] args) {
        int[] nums = {-1,0,2,3,5,8,10};
        int target = 2;

        Solution solution = new Solution();
        int i = solution.search(nums, target);
        if (i == -1){
            System.out.println("不含target值");
        }else {
            System.out.println(target +"的下标为： " + i);
        }
    }
}
